<template>
  <div class='child-view'>
    <p>儿子组件</p>{{result}}
    <GrandChild v-bind="$attrs" @upFoo="upFoo"></GrandChild>
  </div>
</template>
<script lang="ts">
import GrandChild from './GrandChild.vue'
import { ref } from 'vue'
export default {
  inheritAttrs: true,
  components: {
    GrandChild
  },
  setup () {
    const result = ref('')
    const upFoo = (e:any) => {
      result.value = e
    }
    return {
      result,
      upFoo
    }
  }
}
</script>
